#pragma once
#include <json/value.h>
#include <pqxx/pqxx>
#include <string>
#include <tuple>
#include <json/json.h>

class PQUtil{
    public :
        static void test();
        static void updatePsql(std::string& path,std::vector<std::tuple<std::string,std::string>>);
        static void updateCpp(std::string& path,std::vector<std::string> codes);
        static void updateCppPdf(std::string& path,std::string& table);
        static void updateCppDoc(std::string& path,std::vector<std::tuple<std::string,std::string>>);
        static void updateVim(std::string& path,std::vector<std::string> codes);
        static void updateRust(std::string& path,std::vector<std::string> codes);
        static Json::Value readData(std::string& table,std::string& cond,std::string& page,std::string& size,std::string& type);
        static Json::Value searchPdfToc(std::string& path,std::string& table,std::string& cid,std::string& pid);
        static Json::Value searchPdfPage(std::string& path,std::string& table,std::string& page);
};
